<div class="w1200 bg_wrap">
    <div id="account" class="logbox clearfix">
        <div style="display:none;" th:fragment="title" th:inline="text">[[#{pageTitle.register}]] - [[#{pageTitle.title}]]</div>

        <div id="register" class="myreg">
            <h3><span th:text="#{register.registerForAccount}">Register for an Account</span></h3>
            <p><span th:text="#{register.signUpNow}">Don't have an account yet? Sign up for one now to gain access to all our member tools</span></p>

            <blc:form id="registrationForm" action="#" th:object="${registrationForm}" th:action="@{/register}" method="post" class="clearfix">
                <input type="hidden" th:field="*{redirectUrl}" />
                <div class="form50">
                    <label for="customer.emailAddress"><span th:text="#{register.email}">Email</span>
                    </label>
                    <span class="error reg_error" th:if="${#fields.hasErrors('customer.emailAddress')}" th:errors="*{customer.emailAddress}"></span>
                    <input type="email" th:field="*{customer.emailAddress}" class="field50" th:classappend="${#fields.hasErrors('customer.emailAddress')}? 'fieldError'" />
                </div>
                <div class="form50">
                    <label for="password"><span th:text="#{register.password}">Password</span>
                    </label>
                    <span class="error reg_error" th:if="${#fields.hasErrors('password')}" th:errors="*{password}"></span>
                    <input type="password" th:field="*{password}" class="field50" th:classappend="${#fields.hasErrors('password')}? 'fieldError'" />
                </div>
                <div class="form50">
                    <label for="confirmPassword"><span th:text="#{register.confirmPassword}">Confirm Password</span>
                    </label>
                    <span class="error reg_error" th:if="${#fields.hasErrors('passwordConfirm')}" th:errors="*{passwordConfirm}"></span>
                    <input type="password" th:field="*{passwordConfirm}" class="field50" th:classappend="${#fields.hasErrors('passwordConfirm')}? 'fieldError'" />
                </div>
                <div class="form50" id="catchaMobileDiv" style="display:none">
                    <label class="login_label password_icon" for="captcha"><span th:text="#{login.captcha}">手机号码</span>
                    </label>
                    <div id="smsCaptchaArea" >
                        <input type="text" name="mobile" id="mobile" th:class="${param.error} ? 'field50 fieldError' : 'field50'" placeholder="手机号码" />
                    </div>
				</div>
                <div class="form50" id="catchaDiv" style="display:none">
	                <label class="login_label password_icon" for="captcha"><span th:text="#{login.captcha}">验证码</span>
	                </label>
	                <input type="text" name="captcha" th:class="${param.error} ? 'field50 fieldError' : 'field50'" style="width:30%" placeholder="验证码" />
	                <div id="imgCaptchaArea" style="width:120px;float:right;display:none;">
	                	<img id="captcha_img" th:src="@{/captcha/cpatchaImg}"/>
	                </div>
	                <button type="button" id="captcha_btn" style="display:none">获取验证码</button>
                </div>
                <div class="form50 agreement">
                    <input id="reg_cb" name="reg_cb" type="checkbox" class="" checked="checked" />
                    <label th:text="#{register.agreeTo}" for="reg_cb">I agree to the</label>
                    <a class="terms_of_service" href="javascript:;"><span th:text="#{register.termsOfService}"> Faxsun Terms of Service.</span></a>
                    <span id="check_tos" th:text="#{register.pleaseAcceptToS}" style="display:none">Please accept the Terms of Service.</span>
                </div>
                <div class="login_register">
                    <input id="reg_btn" name="reg_btn" class="register_button big red" type="submit" th:value="#{register.register}" />
                </div>
                <div class="login_register_alt_links reg_pannel">
                    <a class="account" th:href="@{/login}"><span th:text="#{register.login}">Login</span></a>
                    <a class="account" th:href="@{/login/forgotPassword}"><span th:text="#{register.forgotPassword}">Forgot Password</span></a>
                </div>
            </blc:form>
        </div>

        <div class="register_pic sign_pic">
            <img th:src="@{/img/register.jpg}" alt="注册 - 范客生活" />
        </div>

        <div th:replace="authentication/partials/termsOfService :: terms-of-service"></div>

    </div>
</div>
